//
//  VipPopView.m
//  TQY
//
//  Created by 甘世清 on 2024/10/21.
//

#import "VipPopView.h"
#import "VipViewController.h"
@implementation VipPopView
+(void)SQ_Show{
    VipPopView * vc = [[VipPopView alloc]initWithFrame:CGRectMake(0, 0, 300, 380)];
    LSTPopView * pop = [LSTPopView initWithCustomView:vc
                                             parentView:nil
                                               popStyle:LSTPopStyleFade dismissStyle:LSTDismissStyleSmoothToBottom];
    pop.hemStyle = LSTHemStyleCenter;
  
    [pop pop];
    LSTPopViewWK(pop)
    [ pop setBgClickBlock:^{
        [wk_pop dismiss];
    }];
   
    [vc.deleted setTouchBlock:^(SQCustomButton * _Nonnull button) {
        [wk_pop dismiss];
    }];
    [vc.yesBtn setTouchBlock:^(SQCustomButton * _Nonnull button) {
        [wk_pop dismiss];
        VipViewController * vc = [[VipViewController alloc]init];
        [[Manager SQ_getCurrentViewController].navigationController pushViewController:vc animated:YES];
    }];
}
- (void)SQ_UIViewForSelfView{
    
    UIImageView * bgImage = [[UIImageView alloc]init];
    bgImage.image = SQGetImage(@"VIP");
    [self addSubview:bgImage];
    [bgImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(220);
        make.height.mas_equalTo(300);
        make.centerX.equalTo(self);
        make.centerY.equalTo(self).offset(-50);
    }];

    UILabel * la1 = [[UILabel alloc]init];
    la1.text = SQNSLocalString(@"开通会员特权");
    la1.textColor = SQColor333333;
    la1.font = FONT_MEDIUM(18);
    [bgImage addSubview:la1];
    [la1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(bgImage);
        make.top.equalTo(bgImage).offset(110);
    }];
    UILabel * la = [[UILabel alloc]init];
    la.text = SQNSLocalString(@"附近交友 无限畅聊");
    la.textColor = SQColor333333;
    la.font = FONT_REGULAR(14);
    [bgImage addSubview:la];
    [la mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(bgImage);
        make.top.equalTo(bgImage).offset(140);
    }];
    
    self.deleted = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(36, 36) midmargin:0];
    self.deleted.image = SQGetImage(@"取消");
    [self addSubview:self.deleted];
    [self.deleted mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.centerX.equalTo(self);
            make.size.mas_equalTo(50);
    }];
    self.yesBtn = [[SQCustomButton alloc]initType:SQCustomButtonTopImageType imageSize:CGSizeMake(0, 0) midmargin:0];
    self.yesBtn.backgroundColor = SQColor(@"#000000");
    self.yesBtn.text = SQNSLocalString(@"开通会员");
    self.yesBtn.font = FONT_MEDIUM(16);
    self.yesBtn.textColor  = SQColor(@"#FFD60A");
    self.yesBtn.layer.cornerRadius = 24;
    [self addSubview:self.yesBtn];
    [self.yesBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self);
            make.width.mas_equalTo(140);
            make.height.mas_equalTo(48);
            make.bottom.equalTo(bgImage.mas_bottom).offset(-27);
    }];
}
@end
